package com.electronicmallapiidea.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_user")    //对接数据表sys_user
public class User {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String username;
    @JsonIgnore    //输出给前端时，爬出此字段
    private String password;
    private String nickname;
    private String phone;
    private String address;
    private String avatarUrl;
    private String role;
    @TableField(exist = false)  //false，字段不进库
    private String  newPassword;
}
